package dayu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Arrays;
import java.util.List;

/**
 * @author dayu
 * @create 2018/12/13 14:17
 * @Description
 */
@Controller
@RequestMapping("/product")
public class ProductController {

    @RequestMapping("/findAll")
    public String findAll(Model model){
        List<String> products = Arrays.asList("小米", "华为19", "魅族", "Iphone4");
        model.addAttribute("products",products);
        return "main";
    }
}
